package com.huawei.hms.push.b;

import com.huawei.hms.common.ApiException;
import com.huawei.hms.common.internal.ResponseErrorCode;
import com.huawei.hms.common.internal.TaskApiCall;
import com.huawei.hms.push.c.b;
import com.huawei.hms.support.api.client.Status;
import com.huawei.hms.support.log.HMSLog;
import o.fjx;

public class a extends TaskApiCall<b, Void> {
    public a(String str, String str2, String str3) {
        super(str, str2, str3);
    }

    protected void doExecute(b bVar, ResponseErrorCode responseErrorCode, String str, fjx<Void> o_fjx_java_lang_Void) {
        if (responseErrorCode.getErrorCode() == 0) {
            HMSLog.i("BaseVoidTask", "Operate succeed");
            o_fjx_java_lang_Void.ॱ(null);
        } else {
            HMSLog.e("BaseVoidTask", "Operate failed with ret=" + responseErrorCode.getErrorCode());
            com.huawei.hms.push.a.a a = com.huawei.hms.push.a.a.a(responseErrorCode.getErrorCode());
            if (a != com.huawei.hms.push.a.a.ERROR_UNKNOWN) {
                o_fjx_java_lang_Void.ॱ(com.huawei.hms.push.a.a.a(a));
            } else {
                o_fjx_java_lang_Void.ॱ(new ApiException(new Status(responseErrorCode.getErrorCode(), responseErrorCode.getErrorReason())));
            }
        }
        com.huawei.hms.push.c.a.a(bVar.getContext(), getUri(), responseErrorCode);
    }
}
